/**
* @Title: RestController.java
* @Package com.an.SpringMvcl
* @Description: TODO(用一句话描述该文件做什么)
* @author antch,861710865@qq.com
* @date 2017年7月14日 下午5:25:21
* @version V1.0
*/


package com.an.SpringMvcl;

import org.springframework.web.bind.annotation.RequestMapping;

import com.an.model.Dog;

/**
* @ClassName: RestController
* @Description: TODO(RestController)
* @author antch,861710865@qq.com
* @date 2017年7月14日 下午5:25:21
*
*/
@org.springframework.web.bind.annotation.RestController
@RequestMapping("/rest")
public class RestController {

	@RequestMapping(value="/getdogjson",produces= {"application/json;charset=UTF-8"})
	public Dog getDogJson(Dog dog) {
		return new Dog(dog.getId()+22,"rest" + dog.getName());
	}
	
	@RequestMapping(value="/getdogxml",produces= {"application/xml;charset=UTF-8"})
	public Dog getDogXml(Dog dog) {
		return new Dog(dog.getId()+22,"rest" + dog.getName());
	}
}
